<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title></title>
  <th:block th:include="common/pub_head :: default"></th:block>
  <th:block th:include="common/pub_head :: layui"></th:block>
</head>
<body>
<img th:src="'data:image/png;base64,' + ${imgBase64}"/>
<script th:inline="javascript">
  layui.use(['table'], function () {

  });
  setTimeout(function () {
    bindConfirm();
  }, 500);

  function bindConfirm() {
    var count = [[${count}]];
    var formData = {
      count: count
    };

    var URL = path + "/alarm/bindConfirm";

    $.post(URL, formData, function (jsonData) {
      if (jsonData.flag) {
        window.parent.listBindAlarmByParams();
        window.parent.layer.msg("绑定成功", {icon: 1});
      } else {
        setTimeout(function () {
          bindConfirm();
        }, 1000);
      }
    }, "json");
  }
</script>
</body>
</html>